package com.yb.node_loop;

/**
 * @program: algorithm_and_data_structure
 * @description: 循环链表的测试类
 * @author: Mr.Bo
 * @create: 2020-07-25 22:13
 **/
public class TestLoopNode {
    public static void main(String[] args) {
        LoopNode n1 = new LoopNode(1);
        LoopNode n2 = new LoopNode(2);
        LoopNode n3 = new LoopNode(3);
        LoopNode n4 = new LoopNode(4);
        // 增加节点
        n1.after(n2);
        n2.after(n3);
        n3.after(n4);
        System.out.println(n1.next().getDate());
        System.out.println(n2.next().getDate());
        System.out.println(n3.next().getDate());
        System.out.println(n4.next().getDate());
    }
}
